package com.clpms.dao.mapper;

import com.clpms.dao.pojo.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseDao {

	List<Course> queryByKeyWord(@Param("keyWord") String keyWord,
	                            @Param("assessmentMethod") Integer assessmentMethod,
	                            @Param("schoolId") Long schoolId,
	                            @Param("teacherId") Long teacherId,
	                            @Param("status") Integer status);

	Course queryById(@Param("id") Long id,
	                 @Param("schoolId") Long schoolId,
	                 @Param("teacherId") Long teacherId,
	                 @Param("status") Integer status);

	Long deleteById(@Param("id") Long id,
	                @Param("schoolId") Long schoolId,
	                @Param("teacherId") Long teacherId,
	                @Param("status") Integer status);

	Course queryByCourse(@Param("courseNo") String courseNo,
	                     @Param("schoolId") Long schoolId,
	                     @Param("teacherId") Long teacherId,
	                     @Param("status") Integer status);

	Course queryByName(@Param("name") String name,
	                   @Param("schoolId") Long schoolId,
	                   @Param("teacherId") Long teacherId,
	                   @Param("status") Integer status);

	Long insert(@Param("course") Course course);

	Long updateById(@Param("course") Course course);

	List<Course> selectAllCourse(@Param("schoolId") Long schoolId, @Param("teacherId") Long teacherId, @Param("status") Integer status);

	List<Course> querybyIdList(@Param("courseIdList") List<Long> courseIdList);

    Long selectCountByTeacherId(@Param("teacherId") Long teacherId,@Param("schoolId") Long schoolId);

	Course selectById(@Param("id") Long id);
}
